#include <iostream>
using namespace std;

int main() {
    string s;
    cin >> s;
    int j=1;
    int sum=0;
    for(int i=0;i<s.size()-1;i++)
    {
        if(s[i]>='0'&&s[i]<='9'){
            sum+=j*(s[i]-'0');
            ++j;
        }
    }
    int yu=sum%11;
    if(yu==10){
        if(s[s.size()-1]=='X'){
            cout << "Right";
        }else{
            s[s.size()-1]='X';
            cout << s;
        }
    }else{
        if(s[s.size()-1]-'0'==yu){
            cout << "Right";
        }else{
            s[s.size()-1]='0'+yu;
            cout << s;
        }
    }
    return 0;
}